package com.rss.inbound.factories;

import org.apache.log4j.Logger;

import com.rss.inbound.enums.SourceNames;
import com.rss.inbound.mappers.EngadgetRssMapper;
import com.rss.inbound.mappers.RssMapper;
import com.rss.inbound.mappers.TechCrunchRssMapper;

public class RssMapperFactory
{

    Logger logger = Logger.getLogger(RssMapperFactory.class);

    public RssMapper createInstance(String param)
    {

	logger.debug("Param sent is " + param);

	if (SourceNames.TECHCRUNCH.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.TECHCRUNCH);
	    return new TechCrunchRssMapper();
	}
	else if (SourceNames.ENGADGET.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.ENGADGET);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.ALLTHINGSD.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.ALLTHINGSD);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.ANDROIDANDME.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.ANDROIDANDME);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.ANDROIDGUYS.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.ANDROIDGUYS);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.ANDROIDINICA.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.ANDROIDINICA);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.APPLEINSIDER.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.APPLEINSIDER);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.ARSTECHNICA.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.ARSTECHNICA);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.BOYGENIUSREPORT.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.BOYGENIUSREPORT);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.CULTOFMAC.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.CULTOFMAC);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.GIGAOM.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.GIGAOM);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.GIZMODO.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.GIZMODO);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.IMANDROID.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.IMANDROID);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.LIFEHACKER.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.LIFEHACKER);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.MACOBSERVER.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.MACOBSERVER);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.MACRUMOURS.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.MACRUMOURS);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.MACUSER.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.MACUSER);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.MACWORLD.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.MACWORLD);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.MASHABLE.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.MASHABLE);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.MOBILEMOO.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.MOBILEMOO);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.GOOGLEOFFICIALANDROIDBLOG.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.GOOGLEOFFICIALANDROIDBLOG);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.PCWORLD.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.PCWORLD);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.PHANDROID.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.PHANDROID);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.PLANETANDROID.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.PLANETANDROID);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.SLASHDOT.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.SLASHDOT);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.TALKANDROID.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.TALKANDROID);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.TECHNOLOGYREVIEW.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.TECHNOLOGYREVIEW);
	    return new EngadgetRssMapper();
	}
	else if (SourceNames.TECHREPUBLIC.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.TECHREPUBLIC);
	    return new EngadgetRssMapper();
	}

	else if (SourceNames.TUAW.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.TUAW);
	    return new EngadgetRssMapper();
	}

	else if (SourceNames.VENTUREBEAT.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.VENTUREBEAT);
	    return new EngadgetRssMapper();
	}

	else if (SourceNames.WIRED.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.WIRED);
	    return new EngadgetRssMapper();
	}

	else if (SourceNames.WORLDOFAPPLE.toString().equals(param))
	{
	    logger.debug("Creating instance for " + SourceNames.WORLDOFAPPLE);
	    return new EngadgetRssMapper();
	}

	return null;
    }   
   
}
